<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}




    <div class="form-group">
        <label for="c-name1" class="control-label col-xs-12 col-sm-2">{:__('Mail from')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name1" data-rule="required" class="form-control"  type="text" value="{$data.mail_from ?? ''}" placeholder="" disabled>

        </div>
    </div>



    <div class="form-group">
        <label for="c-name3" class="control-label col-xs-12 col-sm-2">{:__('Receive Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name3" data-rule="required" class="form-control" name="row[receiver]" type="text" value="" placeholder="">

        </div>
    </div>







    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[id]" value="{$id}">
            <input type="hidden" name="row[mail_from]" value="{$data['mail_from']}">
            <input type="hidden" name="row[mail_smtp_host]" value="{$data['mail_smtp_host']}">
            <input type="hidden" name="row[mail_smtp_port]" value="{$data['mail_smtp_port']}">
            <input type="hidden" name="row[mail_smtp_user]" value="{$data['mail_smtp_user']}">
            <input type="hidden" name="row[mail_smtp_pass]" value="{$data['mail_smtp_pass']}">
            <input type="hidden" name="row[mail_verify_type]" value="{$data['mail_verify_type']}">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    function copyValueToAnotherInput() {
        // 获取输入框1的值
        var input1Value = document.getElementById('c-name1').value;
        var input2Value = document.getElementById('c-name2').value;
        var input3Value = document.getElementById('c-name3').value;
        // 将输入框1的值设置到输入框2
        if(input2Value == ''){
            document.getElementById('c-name2').value = input1Value;
        }
        if(input3Value == ''){
            document.getElementById('c-name3').value = input1Value;
        }
    }
</script>
